<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Title</title>
    <link href="../../easyui/themes/default/easyui.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/icon.css"/>

    <script src="../../easyui/jquery.min.js" type="text/javascript"></script>
    <script src="../../easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>

    <script src="../../js/common/constant.js" type="text/javascript"></script>
    <script src="../../js/common/common.js" type="text/javascript"></script>

    <script src="../../js/news/index.js" type="text/javascript"></script>

    <link rel="stylesheet" href="../../kindeditor/themes/default/default.css" />
    <link rel="stylesheet" href="../../kindeditor/plugins/code/prettify.css" />
    <script src="../../kindeditor/kindeditor-all.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../kindeditor/lang/zh-CN.js" type="text/javascript" charset="utf-8"></script>
    <script charset="utf-8" src="../../kindeditor/plugins/code/prettify.js" type="text/javascript"></script>

    <script type="text/javascript">

        KindEditor.options.filterMode=false;

        KindEditor.ready(function (K) {
            window.editor = K.create('#editor_id', {
                cssPath : '../../kindeditor/plugins/code/prettify.css',
                uploadJson : ws_url+'/upload_json.jsp?token='+gtoken,
                fileManagerJson : ws_url+'/file_manager_json.jsp?token='+gtoken,
                allowFileManager : true,
                allowImageRemote : true,
                formatUploadUrl : false,
                resizeType: 0,
                items: [
                    'source', '|', 'undo', 'redo', '|', 'preview', 'template', 'code', 'cut', 'copy', 'paste',
                    'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                    'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                    'superscript', 'clearhtml', 'quickformat', 'selectall', '/',
                    'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                    'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
                    'table', 'hr', 'emoticons', 'pagebreak',
                    'anchor', 'link', 'unlink'
                ],
                afterCreate : function() {
                    var self = this;
                    K.ctrl(document, 13, function() {
                        self.sync();
                        document.forms['form1'].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function() {
                        self.sync();
                        document.forms['form1'].submit();
                    });
                },
                afterBlur:function(){this.sync();}
            });

            prettyPrint();

        });
    </script>

</head>
<body class="easyui-layout">

<!--主窗体-->
<div region="center" style="padding: 5px;" border="false">
    <table id="newsgrid">
    </table>
</div>

<!--工具栏-->

<div id="tb" style="padding:5px;height:auto">
    <div style="margin-bottom:5px">
        <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doAdd()">添加</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="doEdit()">修改</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true" onclick="doDelete()">删除</a>
    </div>
    <div>
        新闻标题:<input id="busername" class="easyui-textbox" style="width:120px">
        新闻类型:
          <input id="newtypes" class="easyui-combobox" style="width:90px" data-options="					          url:'../../other/newtypes.json',
              method:'get',
              valueField:'id',
              textField:'text',
              panelHeight:'auto'">
        <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="doSearch()">查询</a>
    </div>
</div>


<!--添加新闻-->
<div id="newsadd" class="easyui-window" title="添加新闻"
     data-options="modal:true,inline:true,closed:true,minimizable:false,maximizable:false,iconCls:'icon-save'"
     style="width:850px;height:530px;padding:6px;">
    <form id="form1" method="post" action="index.html">
        <div style="padding: 10px 0px 10px 50px;">
            <input style="width: 250px; display:none" class="easyui-validatebox" type="text"
                   data-options="required:true"
                   id="id" name="id"/>
            <table style="text-align: left; width: auto; border-spacing:0px 8px;">
                <tr>
                    <td>
                        新闻标题:
                    </td>
                    <td>
                        <input style="width: 300px;" class="easyui-validatebox" type="text" data-options="required:true"
                               name="title" id="title"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        新闻类型:
                    </td>
                    <td>
                        <input id="newtypes_add" class="easyui-combobox" style="width:90px" data-options="					          url:'../../other/newtypes.json',
              method:'get',
              valueField:'id',
              textField:'text',
              panelHeight:'auto'">
                    </td>
                </tr>
                <tr>
                    <td>
                        新闻内容:
                    </td>
                    <td>
                    <textarea id="editor_id" name="content" style="width:500px;height:300px;">
                    </textarea>
                    </td>
                </tr>
                <tr>
                    <td>
                        发布日期:
                    </td>
                    <td>
                        <input style="width: auto;" class="easyui-datebox" type="text"
                               name="publishDt" id="publishDt"/>
                    </td>
                </tr>
            </table>
        </div>
        <div style="text-align: center; padding: 5px 5px 10px 10px">

            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:newssubmitForm()" id="submit"
               iconcls="icon-save">确定</a> <a href="javascript:void(0)" class="easyui-linkbutton"
                                             onclick="javascript:newscancel()"
                                             iconcls="icon-cancel">返回</a>

        </div>
    </form>
</div>


</body>
</html>